// @Description
// @Author  xiaoyang
// @Date  2023/4/28 3:52 下午

package dao

import (
	"github.com/jinzhu/gorm"
	"golang-manage-admin/providers"
)

type DelayedQueueDao struct {
	BaseDao
}

func NewDelayedQueueDao() *DelayedQueueDao {
	dao := new(DelayedQueueDao)
	dao.Init()
	return dao
}

// SaveDelayedQueue
// @Description: 数据插入
// @Author yang 2025-11-26 18:31:16
// @Param tx
// @Param delayedQueue
// @Return error
func (dqd *DelayedQueueDao) SaveDelayedQueue(tx *gorm.DB, delayedQueue *DelayedQueue) error {
	// 事务
	tx = dqd.CheckStartTransaction(tx, providers.Mysql)
	if result := tx.Create(delayedQueue); result.Error != nil {
		return result.Error
	}
	return nil
}
